<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 斐波那契
        // fib(m) = fib(m-1)+fib(m-2)
      
function fn(n){
    if(n <= 2){
        return 1;    
    }else{
        return fn(n-1) + fn(n-2);
    }
}
var a =fn(7)
console.log(a)
    </script>
</body>
</html>